import React, { Component } from 'react'
import Header from '../../components/Header/Header'
import qs from 'qs'
export default class List extends Component {
  componentDidMount(){
    let search=this.props.location.search.slice(1);
    
    //第二种方式
    // let r = new URLSearchParams(search)
    // console.log(r.get('id'));


    //第三种 qs.parse()  
    //qs.stringify()和qs.parse()相反，是转回去 
    let result = qs.parse(search)
    console.log(result);
  }
  render() {
    return (
      <div>
        <Header title='商品列表' back></Header>
      </div>
    )
  }
}
